.package_open_box{
    background-image: url("./red_envelope_small_open.png");
    display: inline-block;
    background-size: cover;
    width: 1.99rem;
    height: 2.32rem;
    padding: .3rem .26rem 0;
    box-sizing: border-box;
    font-size: 0.34rem;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #C53B31;
    line-height: .48rem;
    text-align: center;
    .small_text{
        font-size: .34rem;
    }
    .big_text{
        font-size: .48rem;
    }
}
.scale_small{
    width: 100%;
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
    .small_text{
        font-size: .22rem;
    }
    .big_text{
        font-size: .30rem;
    }
}
.package{
    width: 1.99rem;
}
.animate{
    animation: textAni 1s;
}
@keyframes textAni{
	30% {
		transform: rotate(10deg);
	}
	40%{
		transform: rotate(-10deg);
	}
	70% {
		transform: rotate(0deg);
		transform: scale(1.2,1.2);
	}
	
}

@mixin opening_box($width: 1.99rem, $height: 2.32rem){
    position: relative;
    width: $width;
    height: $height;
    $bw: ($width * 0.58);
    cursor: pointer;
    .bg{
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
    }
    .head{
        position: absolute;
        width: calc(100% + 0.02rem);
        height: 37%;
        top: 0;
        left: -0.02rem;
    }
    .button{
        position: absolute;
        width: $bw;
        height: $bw;
        top: 11.38%; 
        left: ($width/2 - $bw/2);
    }
}

@mixin animate_opening{
    z-index: 99;
    
    @content;
    .buttonAni{
        animation: btn .4s forwards .4s;
    }
    @keyframes btn{
        to {opacity: 0;}
    }
    .headAni{
        animation: head 1s forwards .4s;
    }
    @keyframes head{
        to {top: -0.842rem;opacity: 0;}
    }
}

.opening_box{
    @include opening_box();
}
.animateOpening{
    @include animate_opening{
        animation: textAni2_ .4s forwards;
        @keyframes textAni2_{
            to {transform: scale(1.4, 1.4);}
        }
    };
}